# -*- coding:utf-8 -*-
"""
@author:Levy
@file:Animal.py
@time:2018/2/11 001115:15
"""

import types

# class Animal(object):
#     def run(self):
#         print('Animal is running...')
#
#
# class Dog(Animal):
#     def run(self):
#         print('dog gogogo')
#
#
# class Cat(Animal):
#     def run(self):
#         print('cat gogogo')
#
#
# dog = Dog()
# cat = Cat()
# dog.run()
# cat.run()
# a = Animal()
#
# print(isinstance(a, Dog), isinstance([1, 2], (list, tuple)), 'ASD'.lower())

# print(type(123)==str,type(None))

from types import MethodType


class Student(object):
    __slots__ = ('name', 'age','score')  # 用tuple定义允许绑定的属性名称
    pass


def set_age(self, age):
    self.age = age


def set_score(self, score):
    self.score = score

class child_Student(Student):
    pass


Student.set_score = set_score
stu = child_Student()
print(stu.set_score(800), stu.score)
